<ui:composition template="/admin/templates/ui2.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:sec="http://www.springframework.org/security/facelets/tags">

	<ui:define name="content">
		<div class="entry">
			<p:toolbar>
				<p:toolbarGroup>
					<h:outputLabel style="padding-left: 15px;"
						value="#{commonMsg.currentPositionLabel}机构类别列表"></h:outputLabel>
				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:separator />
					<sec:ifAnyGranted roles="6">
					<p:button value="新增机构类别"
						outcome="/admin/huaxi/orgTypeEdit"></p:button>
					</sec:ifAnyGranted>
				</p:toolbarGroup>
			</p:toolbar>
			<h:form id="form">


				<p:dataTable lazy="true" id="dataTable"
					value="#{orgTypeList.lazyModel}" var="orgType" paginator="true"
					paginatorPosition="bottom" rows="15"
					currentPageReportTemplate="#{commonMsg.pageReportTemplate}"
					paginatorTemplate="#{commonMsg.paginatorTemplate}"
					rowsPerPageTemplate="15,50,100"
					emptyMessage="#{commonMsg.noResultMsg}">
					<p:column headerText="编号"  style="text-align:center;">
						<h:outputText value="#{orgType.id}"></h:outputText>
					</p:column>
					<p:column style="text-align:center;">
						<f:facet name="header">
							<h:outputText value="机构名称"></h:outputText>
						</f:facet>
						<h:outputText value="#{orgType.name}"></h:outputText>
					</p:column>
					
					<p:column style="text-align:center;">
						<f:facet name="header">
							<h:outputText value="机构描述"></h:outputText>
						</f:facet>
						<h:outputText value="#{orgType.description}"></h:outputText>
					</p:column>
					
					
					<p:column style="text-align:center;">
						<f:facet name="header">
							<h:outputText value="操作"></h:outputText>
						</f:facet>
							&#160;&#160;
							
						<h:link value="#{commonMsg.editLabel}"
							outcome="/admin/huaxi/orgTypeEdit?id=#{orgType.id}"></h:link> |
                    <p:commandLink value="删除" update="@form" onstart="return confirm('确定删除么')" 
						action="#{orgTypeHome.delete(orgType.id)}"></p:commandLink>
					</p:column>
					
				</p:dataTable>
				
			</h:form>
		</div>
	</ui:define>
</ui:composition>
